<template>
  <Detail :show-type="'singer'" :song-list="songList" :singer-detail="item" />
</template>

<script setup lang="ts">
import { computed, ref } from "vue"
import Detail from "@/view/components/Detail.vue"
import { useRoute } from "vue-router";
import { ISingerDetailItem, ISingerItem } from "@/fetch/type";
import { getSongBySingerId } from "@/fetch/singer";

const route = useRoute()
const item = computed(() => route.query as unknown as ISingerItem)
const songList = ref<ISingerDetailItem[]>([])
getSongBySingerId(item.value.id).then(({ data }) => {
  songList.value = data.data
})


</script>
<style lang="scss" scoped></style>